# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=k3b
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/multimedia/org.kde.k3b"
pkgdesc="A full-featured CD/DVD/Blu-ray burning and ripping application"
license="GPL-2.0-or-later AND GFDL-1.2-only"
depends="
	cdrdao
	dvd+rw-tools
	libburn
	"
makedepends="
	extra-cmake-modules
	flac-dev
	karchive5-dev
	kcmutils5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kdoctools5-dev
	kfilemetadata5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	kjobwidgets5-dev
	knewstuff5-dev
	knotifications5-dev
	knotifyconfig5-dev
	kservice5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	lame-dev
	libdvdread-dev
	libkcddb-dev
	libmad-dev
	libsamplerate-dev
	libvorbis-dev
	qt5-qtbase-dev
	samurai
	shared-mime-info
	solid5-dev
	taglib-dev
	"
_repo_url="https://invent.kde.org/multimedia/k3b.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/k3b-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DK3B_BUILD_MUSE_DECODER_PLUGIN=OFF \
		-DK3B_BUILD_SNDFILE_DECODER_PLUGIN=OFF \
		-DK3B_ENABLE_MUSICBRAINZ=OFF
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a30e46516c66c3bdcd3f04675a33f0801b7ceee0659081a7c63bc29d1161d227a7157e779ec7cad42f7f8ac9cd7cdbf9f14577bc7bbaa05c5fb9dfda1e8e5d62  k3b-23.08.4.tar.xz
"
